/*
* pps_bom
*/
package com.pitop.project.api;

import com.pitop.project.entity.ProjectBom;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 项目bom关联 api请求熔断器
 *
 * @author berton
 */
@FeignClient(value = "pps-cloud-provider", fallback = ProjectBomFeignApiImpl.class)
public interface ProjectBomFeignApi {
    /**
     * 查询ProjectBom一个详情信息
     *
     * @param id
     * @param projectCode 项目编码
     * @param bomCode     bom编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/load")
    ProjectBom load(@RequestParam("id") Long id, @RequestParam("projectCode") String projectCode, @RequestParam("bomCode") String bomCode);

    /**
     * 查询ProjectBom一个详情信息
     *
     * @param id
     * @param projectCode 项目编码
     * @param bomCode     bom编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/get")
    ProjectBom get(@RequestParam("id") Long id, @RequestParam("projectCode") String projectCode, @RequestParam("bomCode") String bomCode);

    /**
     * 根据条件id查询ProjectBom一个详情信息
     *
     * @param id
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/load/id/{id}")
    ProjectBom loadById(@RequestParam("id") Long id);

    /**
     * 根据条件projectCode查询ProjectBom一个详情信息
     *
     * @param projectCode 项目编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/load/projectCode/{projectCode}")
    ProjectBom loadByProjectCode(@RequestParam("projectCode") String projectCode);

    /**
     * 根据条件bomCode查询ProjectBom一个详情信息
     *
     * @param bomCode bom编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/load/bomCode/{bomCode}")
    ProjectBom loadByBomCode(@RequestParam("bomCode") String bomCode);

    /**
     * 根据条件id查询ProjectBom一个详情信息
     *
     * @param id
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/get/id/{id}")
    ProjectBom getById(@RequestParam("id") Long id);

    /**
     * 根据条件projectCode查询ProjectBom一个详情信息
     *
     * @param projectCode 项目编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/get/projectCode/{projectCode}")
    ProjectBom getByProjectCode(@RequestParam("projectCode") String projectCode);

    /**
     * 根据条件bomCode查询ProjectBom一个详情信息
     *
     * @param bomCode bom编码
     * @return ProjectBom
     */
    @GetMapping(value = "/projectBom/get/bomCode/{bomCode}")
    ProjectBom getByBomCode(@RequestParam("bomCode") String bomCode);

    /**
     * 删除ProjectBom
     */
    @DeleteMapping("/projectBom/delete")
    void delete(@RequestParam("id") Long id, @RequestParam("projectCode") String projectCode, @RequestParam("bomCode") String bomCode);


    /**
     * 查询ProjectBom信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/projectBom/list")
    List<ProjectBom> list(@RequestBody ProjectBom projectBom, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 查询ProjectBom信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/projectBom/list/by")
    List<ProjectBom> listByPk(@RequestParam("id") Long id, @RequestParam("projectCode") String projectCode, @RequestParam("bomCode") String bomCode, @RequestParam("curPage") int curPage, @RequestParam("pageSize") int pageSize);


    /**
     * 统计ProjectBom信息数量根据主键
     *
     * @return 总条数
     */
    @GetMapping(value = "/projectBom/count/by")
    Integer count(@RequestParam("id") Long id, @RequestParam("projectCode") String projectCode, @RequestParam("bomCode") String bomCode);

    /**
     * 统计ProjectBom信息数量
     *
     * @return 总条数
     */
    @PostMapping(value = "/projectBom/count")
    Integer count(@RequestBody ProjectBom projectBom);


    /**
     * 创建ProjectBom
     *
     * @return ProjectBom
     */
    @PostMapping("/projectBom/build")
    ProjectBom build(@RequestBody ProjectBom projectBom);


    /**
     * 修改ProjectBom
     *
     * @return ProjectBom
     */
    @PutMapping("/projectBom/modify")
    ProjectBom modify(@RequestBody ProjectBom projectBom);


}
